package com.namecard.namecardapi;

import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
import org.springframework.context.annotation.Bean;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.transaction.annotation.EnableTransactionManagement;
import org.springframework.web.client.RestTemplate;


/**
 * @author wzx
 */
@SpringBootApplication
@EnableTransactionManagement
@MapperScan("com.namecard.namecardapi.mapper")
@EnableScheduling
public class NameCardApiApplication {
    public static void main(String[] args) {
        SpringApplication.run(NameCardApiApplication.class, args);
        System.out.println("启动成功");
    }

    /**
     * 注册restTemplate
     */
    @Bean
    public RestTemplate restTemplate(){
        return new RestTemplate();
    }
}
